x11: Always set None pixmap for no background
authorBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 14:17:44 +0000 (16:17 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 19 Jun 2018 14:43:56 +0000 (16:43 +0200)
None means no background, so it's always the correct thing to use and
ParentRelative is always wrong.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1134
gdk/x11/gdkwindow-x11.c

index 00a3a6d26811bbc2b3d08f959cf4b5241899e0b4..c6205e42ebfeb432ce43a46c2324c3e74e08b877 100644 (file)
@@ -2985,17 +2985,8 @@ gdk_window_x11_set_background (GdkWindow      *window,
 
   if (pattern == NULL)
     {
-      GdkWindow *parent;
-
-      /* X throws BadMatch if the parent has a different depth when
-       * using ParentRelative */
-      parent = gdk_window_get_parent (window);
-      if (parent && window->depth != parent->depth)
-        XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
-                                    GDK_WINDOW_XID (window), None);
-      else
-        XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
-                                    GDK_WINDOW_XID (window), ParentRelative);
+      XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
+                                  GDK_WINDOW_XID (window), None);
       return;
     }